import {BaseConfig, FieldConfig} from "@/fields/config";
export class DateConfig extends BaseConfig {
  title = "日期";
  dateType = 'date';
  dateFormat = ''; // 日期选择框格式化显示
  valueFormat = 'yyyy-MM-dd'; // 值类型格式化
  propsValue = {
    'dateType': 'dateType',
    'dateFormat': 'dateFormat'
  }
}

const fieldType = "date";

export const dateDefine = {
  name:"日期",
  icon:"el-icon-s-claim",
  type: fieldType,
  create: () => {
    const dateConfig = new DateConfig();
    return new FieldConfig(fieldType, dateConfig);
  },
  design: () => import(/* webpackChunkName: "form.comp.all" */ "@/views/fields/designer/date/index"),
  config: () => import(/* webpackChunkName: "form.comp.all" */ "@/views/fields/common/PropsPanel")
}
